/*----------------------------------------------------------------------------
 *      LPC2378 Ethernet Definitions
 *----------------------------------------------------------------------------
 *      Name:    EMAC.H
 *      Purpose: Philips LPC2378 EMAC hardware definitions
 *----------------------------------------------------------------------------
 *      Copyright (c) 2006 KEIL - An ARM Company. All rights reserved.
 *---------------------------------------------------------------------------*/

#ifndef __EMAC_H
#define __EMAC_H
#include "lpc_types.h"


// prototypes
//void           Init_EMAC(void);
void Init_EMAC(uint8_t *EMACAddr);
//uint16_t ReadFrameBE_EMAC(void);
void           CopyToFrame_EMAC(void *Source, unsigned int Size);
void           CopyFromFrame_EMAC(void *Dest, uint16_t Size);
void           DummyReadFrame_EMAC(uint16_t Size);
uint16_t StartReadFrame(void);
void           EndReadFrame(void);
unsigned int   CheckFrameReceived(void);
void           RequestSend(uint16_t FrameSize);
unsigned int   Rdy4Tx(void);

void CopyToFrame_EMAC_Start(void *Source, unsigned int Size);
void CopyToFrame_EMAC_End(void);

int32_t CheckTransmitIndex(void);
int32_t CheckReceiveIndex(void);
void RxDoneFunc(void (*pfnIntCb)(void));




#endif

/*----------------------------------------------------------------------------
 * end of file
 *---------------------------------------------------------------------------*/

